
public class test {

    public static void main(String[] args) {


//        MyQueue queue = new MyQueue();
//        queue.push(1);
//        queue.push(2);
//        queue.push(3);
//        queue.push(4);
//        System.out.println(queue.peek());
//        System.out.println(queue.pop());
//        System.out.println(queue.peek());

        MyBinaryTree binaryTree = new MyBinaryTree();

        binaryTree.createBinaryTree();
        binaryTree.preOrder(binaryTree.root);
        System.out.println();
//        System.out.println("节点的个数为：" + binaryTree.size(binaryTree.root));
//
//        System.out.println("叶子节点的个数为：" + binaryTree.getLeafSize(binaryTree.root));
//        System.out.println("该二叉树的深度为：" + binaryTree.getHeight(binaryTree.root));
//        System.out.println("第k层节点个数为：" + binaryTree.getLevelNodeCount(binaryTree.root, 1));
//        MyBinaryTree.BTNode btNode = binaryTree.find(binaryTree.root, 10);
//        if(btNode != null) {
//            System.out.println("找到了");
//        }else {
//            System.out.println("没有找到");
//        }
//        System.out.println(binaryTree.isCom(binaryTree.root));

        System.out.println(binaryTree.tree2str(binaryTree.root));
    }
}
